<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>spade.xmppd.modules.wq</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="spade-module.html">Package&nbsp;spade</a> ::
        <a href="spade.xmppd-module.html">Package&nbsp;xmppd</a> ::
        <a href="spade.xmppd.modules-module.html">Package&nbsp;modules</a> ::
        Module&nbsp;wq
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="spade.xmppd.modules.wq-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="spade.xmppd.modules.wq-module.html">Module spade.xmppd.modules.wq</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package spade.xmpp=spade.xmpp-module.html"><a title="spade.xmpp" class="py-name" href="#" onclick="return doclink('link-0', 'xmpp', 'link-0');">xmpp</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-1" class="py-name" targets="Variable spade.bdi.Goal.types=spade.bdi.Goal-class.html#types"><a title="spade.bdi.Goal.types" class="py-name" href="#" onclick="return doclink('link-1', 'types', 'link-1');">types</a></tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Method spade.pyparsing.Keyword.copy()=spade.pyparsing.Keyword-class.html#copy,Method spade.pyparsing.ParseResults.copy()=spade.pyparsing.ParseResults-class.html#copy,Method spade.pyparsing.ParserElement.copy()=spade.pyparsing.ParserElement-class.html#copy"><a title="spade.pyparsing.Keyword.copy
spade.pyparsing.ParseResults.copy
spade.pyparsing.ParserElement.copy" class="py-name" href="#" onclick="return doclink('link-2', 'copy', 'link-2');">copy</a></tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"> </tt>
<a name="ItemNotFound"></a><div id="ItemNotFound-def"><a name="L5"></a><tt class="py-lineno">  5</tt> <a class="py-toggle" href="#" id="ItemNotFound-toggle" onclick="return toggle('ItemNotFound');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.ItemNotFound-class.html">ItemNotFound</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ItemNotFound-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ItemNotFound-expanded"><a name="ItemNotFound.__init__"></a><div id="ItemNotFound.__init__-def"><a name="L6"></a><tt class="py-lineno">  6</tt> <a class="py-toggle" href="#" id="ItemNotFound.__init__-toggle" onclick="return toggle('ItemNotFound.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.ItemNotFound-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="Conflict"></a><div id="Conflict-def"><a name="L7"></a><tt class="py-lineno">  7</tt> <a class="py-toggle" href="#" id="Conflict-toggle" onclick="return toggle('Conflict');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Conflict-class.html">Conflict</a><tt class="py-op">(</tt><tt class="py-base-class">Exception</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Conflict-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Conflict-expanded"><a name="Conflict.__init__"></a><div id="Conflict.__init__-def"><a name="L8"></a><tt class="py-lineno">  8</tt> <a class="py-toggle" href="#" id="Conflict.__init__-toggle" onclick="return toggle('Conflict.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Conflict-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt class="py-keyword">pass</tt> </tt>
</div></div><a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"> </tt>
<a name="Group"></a><div id="Group-def"><a name="L10"></a><tt class="py-lineno"> 10</tt> <a class="py-toggle" href="#" id="Group-toggle" onclick="return toggle('Group');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html">Group</a><tt class="py-op">:</tt> </tt>
</div><div id="Group-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Group-expanded"><a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">        A XEP-142 Workgroup</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="Group.__init__"></a><div id="Group.__init__-def"><a name="L14"></a><tt class="py-lineno"> 14</tt> <a class="py-toggle" href="#" id="Group.__init__-toggle" onclick="return toggle('Group.__init__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">gname</tt><tt class="py-op">,</tt> <tt class="py-param">wq</tt><tt class="py-op">,</tt> <tt class="py-param">users</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.__init__-expanded"><a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-3" class="py-name" targets="Variable spade.Agent.name=spade.Agent-module.html#name,Variable spade.MTP.name=spade.MTP-module.html#name,Variable spade.Organization.name=spade.Organization-module.html#name,Variable spade.Organization_new.name=spade.Organization_new-module.html#name,Variable spade.Unit.name=spade.Unit-module.html#name,Variable spade.Unit_new.name=spade.Unit_new-module.html#name,Variable spade.socialnetwork.name=spade.socialnetwork-module.html#name,Variable spade.xmpp.auth.name=spade.xmpp.auth-module.html#name,Variable spade.xmpp.browser.name=spade.xmpp.browser-module.html#name,Variable spade.xmpp.commands.Command_Handler_Prototype.name=spade.xmpp.commands.Command_Handler_Prototype-class.html#name,Variable spade.xmpp.commands.TestCommand.name=spade.xmpp.commands.TestCommand-class.html#name,Variable spade.xmpp.commands.name=spade.xmpp.commands-module.html#name,Variable spade.xmpp.dispatcher.name=spade.xmpp.dispatcher-module.html#name,Variable spade.xmpp.features.name=spade.xmpp.features-module.html#name,Variable spade.xmpp.filetransfer.name=spade.xmpp.filetransfer-module.html#name,Variable spade.xmpp.name=spade.xmpp-module.html#name,Variable spade.xmpp.protocol.name=spade.xmpp.protocol-module.html#name,Variable spade.xmpp.roster.name=spade.xmpp.roster-module.html#name,Variable spade.xmpp.transports.name=spade.xmpp.transports-module.html#name,Variable spade.xmppd.xmppd.name=spade.xmppd.xmppd-module.html#name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-3', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">gname</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module spade.xmppd.modules.wq=spade.xmppd.modules.wq-module.html"><a title="spade.xmppd.modules.wq" class="py-name" href="#" onclick="return doclink('link-4', 'wq', 'link-4');">wq</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="spade.xmppd.modules.wq" class="py-name" href="#" onclick="return doclink('link-5', 'wq', 'link-4');">wq</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Method spade.Platform.SpadePlatform.agents()=spade.Platform.SpadePlatform-class.html#agents"><a title="spade.Platform.SpadePlatform.agents" class="py-name" href="#" onclick="return doclink('link-6', 'agents', 'link-6');">agents</a></tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt>  <tt class="py-comment"># An "agent" here is a client that "works" in the group and assists users</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">                <tt class="py-keyword">for</tt> <tt class="py-name">u</tt> <tt class="py-keyword">in</tt> <tt class="py-name">users</tt><tt class="py-op">:</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt><tt class="py-op">[</tt><tt class="py-name">u</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Method spade.Agent.AbstractAgent.DEBUG()=spade.Agent.AbstractAgent-class.html#DEBUG,Method spade.spade_backend.SpadeBackend.DEBUG()=spade.spade_backend.SpadeBackend-class.html#DEBUG,Method spade.xmpp.client.PlugIn.DEBUG()=spade.xmpp.client.PlugIn-class.html#DEBUG,Method spade.xmpp.simplexml.NodeBuilder.DEBUG()=spade.xmpp.simplexml.NodeBuilder-class.html#DEBUG,Method spade.xmpp.transports.HTTPPROXYsocket.DEBUG()=spade.xmpp.transports.HTTPPROXYsocket-class.html#DEBUG"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-7', 'DEBUG', 'link-7');">DEBUG</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="spade.xmppd.modules.wq" class="py-name" href="#" onclick="return doclink('link-8', 'wq', 'link-4');">wq</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-9', 'DEBUG', 'link-7');">DEBUG</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-10', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Group %s created"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-11" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-11', 'name', 'link-3');">name</a></tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"ok"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="Group.fullJID"></a><div id="Group.fullJID-def"><a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="Group.fullJID-toggle" onclick="return toggle('Group.fullJID');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#fullJID">fullJID</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.fullJID-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.fullJID-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-12', 'name', 'link-3');">name</a></tt><tt class="py-op">)</tt> <tt class="py-op">+</tt> <tt class="py-string">'@'</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name"><a title="spade.xmppd.modules.wq" class="py-name" href="#" onclick="return doclink('link-13', 'wq', 'link-4');">wq</a></tt><tt class="py-op">.</tt><tt class="py-name">jid</tt><tt class="py-op">)</tt> </tt>
</div><a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"> </tt>
<a name="Group.dispatch"></a><div id="Group.dispatch-def"><a name="L29"></a><tt class="py-lineno"> 29</tt> <a class="py-toggle" href="#" id="Group.dispatch-toggle" onclick="return toggle('Group.dispatch');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#dispatch">dispatch</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">,</tt> <tt class="py-param">stanza</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.dispatch-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.dispatch-expanded"><a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">                Mini-dispatcher for the jabber stanzas that arrive to the group</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-14', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Group '"</tt><tt class="py-op">+</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name" targets="Method spade.AID.aid.getName()=spade.AID.aid-class.html#getName,Method spade.Agent.AbstractAgent.getName()=spade.Agent.AbstractAgent-class.html#getName,Method spade.DF.DfAgentDescription.getName()=spade.DF.DfAgentDescription-class.html#getName,Method spade.DF.ServiceDescription.getName()=spade.DF.ServiceDescription-class.html#getName,Method spade.pyparsing.ParseResults.getName()=spade.pyparsing.ParseResults-class.html#getName,Method spade.xmpp.roster.Roster.getName()=spade.xmpp.roster.Roster-class.html#getName,Method spade.xmpp.simplexml.Node.getName()=spade.xmpp.simplexml.Node-class.html#getName,Method spade.xmppd.modules.muc.Room.getName()=spade.xmppd.modules.muc.Room-class.html#getName,Method spade.xmppd.modules.wq.Group.getName()=spade.xmppd.modules.wq.Group-class.html#getName,Method spade.xmppd.xmppd.Session.getName()=spade.xmppd.xmppd.Session-class.html#getName"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-15', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">+</tt><tt class="py-string">"' dispatcher called"</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-16', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'iq'</tt><tt class="py-op">:</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Method spade.xmppd.modules.muc.MUC.IQ_cb()=spade.xmppd.modules.muc.MUC-class.html#IQ_cb,Method spade.xmppd.modules.muc.Room.IQ_cb()=spade.xmppd.modules.muc.Room-class.html#IQ_cb,Method spade.xmppd.modules.wq.Group.IQ_cb()=spade.xmppd.modules.wq.Group-class.html#IQ_cb"><a title="spade.xmppd.modules.muc.MUC.IQ_cb
spade.xmppd.modules.muc.Room.IQ_cb
spade.xmppd.modules.wq.Group.IQ_cb" class="py-name" href="#" onclick="return doclink('link-17', 'IQ_cb', 'link-17');">IQ_cb</a></tt><tt class="py-op">(</tt><tt id="link-18" class="py-name" targets="Module spade.xmpp.session=spade.xmpp.session-module.html"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-18', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-19', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'presence'</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Method spade.xmppd.modules.muc.MUC.Presence_cb()=spade.xmppd.modules.muc.MUC-class.html#Presence_cb,Method spade.xmppd.modules.muc.Room.Presence_cb()=spade.xmppd.modules.muc.Room-class.html#Presence_cb"><a title="spade.xmppd.modules.muc.MUC.Presence_cb
spade.xmppd.modules.muc.Room.Presence_cb" class="py-name" href="#" onclick="return doclink('link-20', 'Presence_cb', 'link-20');">Presence_cb</a></tt><tt class="py-op">(</tt><tt id="link-21" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-21', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-22', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'message'</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Method spade.xmppd.modules.muc.Room.Message_cb()=spade.xmppd.modules.muc.Room-class.html#Message_cb"><a title="spade.xmppd.modules.muc.Room.Message_cb" class="py-name" href="#" onclick="return doclink('link-23', 'Message_cb', 'link-23');">Message_cb</a></tt><tt class="py-op">(</tt><tt id="link-24" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-24', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">                <tt class="py-comment"># TODO: Implement the rest of protocols</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"> </tt>
<a name="Group.IQ_cb"></a><div id="Group.IQ_cb-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="Group.IQ_cb-toggle" onclick="return toggle('Group.IQ_cb');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#IQ_cb">IQ_cb</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">,</tt> <tt class="py-param">stanza</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.IQ_cb-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.IQ_cb-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">                IQ Callback for a group</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-25" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-25', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"IQ callback of group %s called"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-26', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"info"</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">                <tt class="py-name">join_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method spade.xmpp.simplexml.Node.getTag()=spade.xmpp.simplexml.Node-class.html#getTag"><a title="spade.xmpp.simplexml.Node.getTag" class="py-name" href="#" onclick="return doclink('link-27', 'getTag', 'link-27');">getTag</a></tt><tt class="py-op">(</tt><tt class="py-string">'join-queue'</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">                <tt class="py-name">depart_queue</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="spade.xmpp.simplexml.Node.getTag" class="py-name" href="#" onclick="return doclink('link-28', 'getTag', 'link-27');">getTag</a></tt><tt class="py-op">(</tt><tt class="py-string">'depart-queue'</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">                <tt class="py-name">queue_status</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="spade.xmpp.simplexml.Node.getTag" class="py-name" href="#" onclick="return doclink('link-29', 'getTag', 'link-27');">getTag</a></tt><tt class="py-op">(</tt><tt class="py-string">'queue_status'</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">                <tt class="py-name">frm</tt> <tt class="py-op">=</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt id="link-30" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-30', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt class="py-name">peer</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">join_queue</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-31', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Join-queue"</tt><tt class="py-op">,</tt><tt class="py-string">"info"</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">                        <tt class="py-name">ns</tt> <tt class="py-op">=</tt> <tt class="py-name">join_queue</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Method spade.xmpp.simplexml.Node.getNamespace()=spade.xmpp.simplexml.Node-class.html#getNamespace"><a title="spade.xmpp.simplexml.Node.getNamespace" class="py-name" href="#" onclick="return doclink('link-32', 'getNamespace', 'link-32');">getNamespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">                        <tt class="py-name">typ</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Method spade.DF.ServiceDescription.getType()=spade.DF.ServiceDescription-class.html#getType,Method spade.xmpp.protocol.DataField.getType()=spade.xmpp.protocol.DataField-class.html#getType,Method spade.xmpp.protocol.DataForm.getType()=spade.xmpp.protocol.DataForm-class.html#getType,Method spade.xmpp.protocol.Protocol.getType()=spade.xmpp.protocol.Protocol-class.html#getType"><a title="spade.DF.ServiceDescription.getType
spade.xmpp.protocol.DataField.getType
spade.xmpp.protocol.DataForm.getType
spade.xmpp.protocol.Protocol.getType" class="py-name" href="#" onclick="return doclink('link-33', 'getType', 'link-33');">getType</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">                        <tt class="py-name">queue_notifications</tt> <tt class="py-op">=</tt> <tt class="py-name">join_queue</tt><tt class="py-op">.</tt><tt id="link-34" class="py-name"><a title="spade.xmpp.simplexml.Node.getTag" class="py-name" href="#" onclick="return doclink('link-34', 'getTag', 'link-27');">getTag</a></tt><tt class="py-op">(</tt><tt class="py-string">'queue-notifications'</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">ns</tt> <tt class="py-op">==</tt> <tt class="py-string">"http://jabber.org/protocol/workgroup"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt class="py-string">'set'</tt> <tt class="py-keyword">and</tt> <tt class="py-name">queue_notifications</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">                                <tt class="py-comment"># User requests to join the group</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">                                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">                                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Method spade.xmppd.modules.wq.Group.addUser()=spade.xmppd.modules.wq.Group-class.html#addUser,Method spade.xmppd.modules.wq.WQ.addUser()=spade.xmppd.modules.wq.WQ-class.html#addUser"><a title="spade.xmppd.modules.wq.Group.addUser
spade.xmppd.modules.wq.WQ.addUser" class="py-name" href="#" onclick="return doclink('link-35', 'addUser', 'link-35');">addUser</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name" targets="Class spade.xmpp.protocol.JID=spade.xmpp.protocol.JID-class.html"><a title="spade.xmpp.protocol.JID" class="py-name" href="#" onclick="return doclink('link-36', 'JID', 'link-36');">JID</a></tt><tt class="py-op">(</tt><tt class="py-name">frm</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name" targets="Method spade.xmpp.protocol.JID.getStripped()=spade.xmpp.protocol.JID-class.html#getStripped"><a title="spade.xmpp.protocol.JID.getStripped" class="py-name" href="#" onclick="return doclink('link-37', 'getStripped', 'link-37');">getStripped</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">                                                <tt class="py-comment"># The joining is succesful</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">                                                <tt class="py-name">reply</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method spade.xmpp.protocol.Iq.buildReply()=spade.xmpp.protocol.Iq-class.html#buildReply,Method spade.xmpp.protocol.Message.buildReply()=spade.xmpp.protocol.Message-class.html#buildReply"><a title="spade.xmpp.protocol.Iq.buildReply
spade.xmpp.protocol.Message.buildReply" class="py-name" href="#" onclick="return doclink('link-38', 'buildReply', 'link-38');">buildReply</a></tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">=</tt><tt class="py-string">"result"</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">                                                <tt id="link-39" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-39', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-40" class="py-name" targets="Method spade.xmpp.session.Session.enqueue()=spade.xmpp.session.Session-class.html#enqueue,Method spade.xmppd.xmppd.Session.enqueue()=spade.xmppd.xmppd.Session-class.html#enqueue"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-40', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">reply</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">                                                <tt class="py-keyword">return</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">                                <tt class="py-keyword">except</tt> <tt id="link-41" class="py-name" targets="Class spade.xmpp.protocol.Conflict=spade.xmpp.protocol.Conflict-class.html,Class spade.xmppd.modules.wq.Conflict=spade.xmppd.modules.wq.Conflict-class.html"><a title="spade.xmpp.protocol.Conflict
spade.xmppd.modules.wq.Conflict" class="py-name" href="#" onclick="return doclink('link-41', 'Conflict', 'link-41');">Conflict</a></tt><tt class="py-op">:</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">                                        <tt class="py-comment"># User already in group</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">                                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-42', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"User tried to join the same group again"</tt><tt class="py-op">,</tt><tt class="py-string">"warn"</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">                                        <tt class="py-name">reply</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name"><a title="spade.xmpp.protocol.Iq.buildReply
spade.xmpp.protocol.Message.buildReply" class="py-name" href="#" onclick="return doclink('link-43', 'buildReply', 'link-38');">buildReply</a></tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">=</tt><tt class="py-string">"error"</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">                                        <tt class="py-name">err</tt> <tt class="py-op">=</tt> <tt id="link-44" class="py-name" targets="Class spade.xmpp.simplexml.Node=spade.xmpp.simplexml.Node-class.html"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-44', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">'error'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'code'</tt><tt class="py-op">:</tt> <tt class="py-string">'409'</tt><tt class="py-op">,</tt> <tt class="py-string">'type'</tt><tt class="py-op">:</tt> <tt class="py-string">'cancel'</tt><tt class="py-op">}</tt> <tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">                                        <tt class="py-name">conflict</tt> <tt class="py-op">=</tt> <tt id="link-45" class="py-name"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-45', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">'conflict'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'xmlns'</tt><tt class="py-op">:</tt> <tt class="py-string">'urn:ietf:params:xml:ns:xmpp-stanzas'</tt><tt class="py-op">}</tt> <tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">                                        <tt class="py-name">err</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name" targets="Method spade.xmpp.simplexml.Node.addChild()=spade.xmpp.simplexml.Node-class.html#addChild"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-46', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">conflict</tt><tt class="py-op">)</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">                                        <tt class="py-name">reply</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-47', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">err</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">                                        <tt id="link-48" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-48', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-49', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">reply</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">                                        <tt class="py-keyword">return</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">                                <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt id="link-50" class="py-name" targets="Variable spade.xmppd.xmppd.e=spade.xmppd.xmppd-module.html#e"><a title="spade.xmppd.xmppd.e" class="py-name" href="#" onclick="return doclink('link-50', 'e', 'link-50');">e</a></tt><tt class="py-op">:</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">                                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-51', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Unknown exception when user was joining a group"</tt><tt class="py-op">,</tt><tt class="py-string">"error"</tt><tt class="py-op">)</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">                                        <tt class="py-keyword">return</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">depart_queue</tt><tt class="py-op">:</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-52', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Depart-queue"</tt><tt class="py-op">,</tt><tt class="py-string">"info"</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">                        <tt class="py-name">ns</tt> <tt class="py-op">=</tt> <tt class="py-name">depart_queue</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="spade.xmpp.simplexml.Node.getNamespace" class="py-name" href="#" onclick="return doclink('link-53', 'getNamespace', 'link-32');">getNamespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">                        <tt class="py-name">typ</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-54" class="py-name"><a title="spade.DF.ServiceDescription.getType
spade.xmpp.protocol.DataField.getType
spade.xmpp.protocol.DataForm.getType
spade.xmpp.protocol.Protocol.getType" class="py-name" href="#" onclick="return doclink('link-54', 'getType', 'link-33');">getType</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">                        <tt class="py-name">jid</tt> <tt class="py-op">=</tt> <tt class="py-name">depart_queue</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="spade.xmpp.simplexml.Node.getTag" class="py-name" href="#" onclick="return doclink('link-55', 'getTag', 'link-27');">getTag</a></tt><tt class="py-op">(</tt><tt class="py-string">'jid'</tt><tt class="py-op">)</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">ns</tt> <tt class="py-op">==</tt> <tt class="py-string">"http://jabber.org/protocol/workgroup"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt class="py-string">'set'</tt><tt class="py-op">:</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">                                <tt class="py-comment"># User requests departing a group</tt> </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">                                <tt class="py-keyword">if</tt> <tt class="py-name">jid</tt><tt class="py-op">:</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">                                        <tt class="py-comment"># TODO: Authenticate user for being able to remove other jid than own</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">                                        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt class="py-name">jid</tt><tt class="py-op">.</tt><tt id="link-56" class="py-name" targets="Method spade.xmpp.simplexml.Node.getData()=spade.xmpp.simplexml.Node-class.html#getData"><a title="spade.xmpp.simplexml.Node.getData" class="py-name" href="#" onclick="return doclink('link-56', 'getData', 'link-56');">getData</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">                                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">                                        <tt class="py-name">user</tt> <tt class="py-op">=</tt> <tt id="link-57" class="py-name"><a title="spade.xmpp.protocol.JID" class="py-name" href="#" onclick="return doclink('link-57', 'JID', 'link-36');">JID</a></tt><tt class="py-op">(</tt><tt class="py-name">frm</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="spade.xmpp.protocol.JID.getStripped" class="py-name" href="#" onclick="return doclink('link-58', 'getStripped', 'link-37');">getStripped</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">                                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                                        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-59" class="py-name" targets="Method spade.xmppd.modules.wq.Group.delUser()=spade.xmppd.modules.wq.Group-class.html#delUser"><a title="spade.xmppd.modules.wq.Group.delUser" class="py-name" href="#" onclick="return doclink('link-59', 'delUser', 'link-59');">delUser</a></tt><tt class="py-op">(</tt><tt class="py-name">user</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                                                <tt class="py-comment"># The departing is succesful</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                                                <tt class="py-name">reply</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-60" class="py-name"><a title="spade.xmpp.protocol.Iq.buildReply
spade.xmpp.protocol.Message.buildReply" class="py-name" href="#" onclick="return doclink('link-60', 'buildReply', 'link-38');">buildReply</a></tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">=</tt><tt class="py-string">"result"</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">                                                <tt id="link-61" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-61', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-62', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">reply</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                                                <tt class="py-name">m</tt> <tt class="py-op">=</tt> <tt id="link-63" class="py-name" targets="Class mimetools.Message=mimetools.Message-class.html,Class spade.xmpp.protocol.Message=spade.xmpp.protocol.Message-class.html"><a title="mimetools.Message
spade.xmpp.protocol.Message" class="py-name" href="#" onclick="return doclink('link-63', 'Message', 'link-63');">Message</a></tt><tt class="py-op">(</tt><tt class="py-name">frm</tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name" targets="Method spade.xmppd.modules.muc.Room.fullJID()=spade.xmppd.modules.muc.Room-class.html#fullJID,Method spade.xmppd.modules.wq.Group.fullJID()=spade.xmppd.modules.wq.Group-class.html#fullJID"><a title="spade.xmppd.modules.muc.Room.fullJID
spade.xmppd.modules.wq.Group.fullJID" class="py-name" href="#" onclick="return doclink('link-64', 'fullJID', 'link-64');">fullJID</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-name">to</tt><tt class="py-op">=</tt><tt class="py-name">frm</tt><tt class="py-op">)</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                                                <tt class="py-name">dq</tt> <tt class="py-op">=</tt> <tt class="py-name">m</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name" targets="Method spade.xmpp.simplexml.Node.setTag()=spade.xmpp.simplexml.Node-class.html#setTag"><a title="spade.xmpp.simplexml.Node.setTag" class="py-name" href="#" onclick="return doclink('link-65', 'setTag', 'link-65');">setTag</a></tt><tt class="py-op">(</tt><tt class="py-string">"depart-queue"</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">"xmlns"</tt><tt class="py-op">:</tt><tt class="py-string">"http://jabber.org/protocol/workgroup"</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">                                                <tt id="link-66" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-66', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-67', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">m</tt><tt class="py-op">)</tt> </tt>
<a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">                                                <tt class="py-keyword">return</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">                                <tt class="py-keyword">except</tt> <tt id="link-68" class="py-name" targets="Class spade.xmppd.modules.wq.ItemNotFound=spade.xmppd.modules.wq.ItemNotFound-class.html"><a title="spade.xmppd.modules.wq.ItemNotFound" class="py-name" href="#" onclick="return doclink('link-68', 'ItemNotFound', 'link-68');">ItemNotFound</a></tt><tt class="py-op">:</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">                                        <tt class="py-comment"># The user was not in the group</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">                                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-69', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"User not in the group"</tt><tt class="py-op">,</tt><tt class="py-string">"warn"</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">                                        <tt class="py-name">reply</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="spade.xmpp.protocol.Iq.buildReply
spade.xmpp.protocol.Message.buildReply" class="py-name" href="#" onclick="return doclink('link-70', 'buildReply', 'link-38');">buildReply</a></tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">=</tt><tt class="py-string">"error"</tt><tt class="py-op">)</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">                                        <tt class="py-name">err</tt> <tt class="py-op">=</tt> <tt id="link-71" class="py-name"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-71', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">'error'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'code'</tt><tt class="py-op">:</tt> <tt class="py-string">'404'</tt><tt class="py-op">,</tt> <tt class="py-string">'type'</tt><tt class="py-op">:</tt> <tt class="py-string">'cancel'</tt><tt class="py-op">}</tt> <tt class="py-op">)</tt> </tt>
<a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">                                        <tt class="py-name">conflict</tt> <tt class="py-op">=</tt> <tt id="link-72" class="py-name"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-72', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">'item-not-found'</tt><tt class="py-op">,</tt> <tt class="py-op">{</tt><tt class="py-string">'xmlns'</tt><tt class="py-op">:</tt> <tt class="py-string">'urn:ietf:params:xml:ns:xmpp-stanzas'</tt><tt class="py-op">}</tt> <tt class="py-op">)</tt> </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">                                        <tt class="py-name">err</tt><tt class="py-op">.</tt><tt id="link-73" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-73', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">conflict</tt><tt class="py-op">)</tt> </tt>
<a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">                                        <tt class="py-name">reply</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-74', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">err</tt><tt class="py-op">)</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">                                        <tt id="link-75" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-75', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-76" class="py-name"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-76', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">reply</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">                                        <tt class="py-keyword">return</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">                                <tt class="py-keyword">except</tt> <tt class="py-name">Exception</tt><tt class="py-op">,</tt> <tt id="link-77" class="py-name"><a title="spade.xmppd.xmppd.e" class="py-name" href="#" onclick="return doclink('link-77', 'e', 'link-50');">e</a></tt><tt class="py-op">:</tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">                                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-78', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Unknown exception when user was departing a group"</tt><tt class="py-op">,</tt><tt class="py-string">"error"</tt><tt class="py-op">)</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">                                        <tt class="py-keyword">return</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">queue_status</tt><tt class="py-op">:</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-79', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Queue-status"</tt><tt class="py-op">,</tt><tt class="py-string">"info"</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">                        <tt class="py-name">ns</tt> <tt class="py-op">=</tt> <tt class="py-name">queue_status</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name"><a title="spade.xmpp.simplexml.Node.getNamespace" class="py-name" href="#" onclick="return doclink('link-80', 'getNamespace', 'link-32');">getNamespace</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">                        <tt class="py-name">typ</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="spade.DF.ServiceDescription.getType
spade.xmpp.protocol.DataField.getType
spade.xmpp.protocol.DataForm.getType
spade.xmpp.protocol.Protocol.getType" class="py-name" href="#" onclick="return doclink('link-81', 'getType', 'link-33');">getType</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">ns</tt> <tt class="py-op">==</tt> <tt class="py-string">"http://jabber.org/protocol/workgroup"</tt> <tt class="py-keyword">and</tt> <tt class="py-name">typ</tt> <tt class="py-op">==</tt> <tt class="py-string">'get'</tt><tt class="py-op">:</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">                                <tt class="py-comment"># User Status Poll</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">                                <tt class="py-name">reply</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="spade.xmpp.protocol.Iq.buildReply
spade.xmpp.protocol.Message.buildReply" class="py-name" href="#" onclick="return doclink('link-82', 'buildReply', 'link-38');">buildReply</a></tt><tt class="py-op">(</tt><tt class="py-name">typ</tt><tt class="py-op">=</tt><tt class="py-string">"result"</tt><tt class="py-op">)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">                                <tt class="py-name">p</tt> <tt class="py-op">=</tt> <tt id="link-83" class="py-name"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-83', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">"position"</tt><tt class="py-op">)</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">                                <tt class="py-name">p</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name" targets="Method spade.xmpp.simplexml.Node.setData()=spade.xmpp.simplexml.Node-class.html#setData"><a title="spade.xmpp.simplexml.Node.setData" class="py-name" href="#" onclick="return doclink('link-84', 'setData', 'link-84');">setData</a></tt><tt class="py-op">(</tt><tt class="py-string">"0"</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">                                <tt class="py-name">queue_status</tt><tt class="py-op">.</tt><tt id="link-85" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-85', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">p</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">                                <tt class="py-name">t</tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="spade.xmpp.simplexml.Node" class="py-name" href="#" onclick="return doclink('link-86', 'Node', 'link-44');">Node</a></tt><tt class="py-op">(</tt><tt class="py-string">"time"</tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">                                <tt class="py-name">t</tt><tt class="py-op">.</tt><tt id="link-87" class="py-name"><a title="spade.xmpp.simplexml.Node.setData" class="py-name" href="#" onclick="return doclink('link-87', 'setData', 'link-84');">setData</a></tt><tt class="py-op">(</tt><tt class="py-string">"0"</tt><tt class="py-op">)</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">                                <tt class="py-name">queue_status</tt><tt class="py-op">.</tt><tt id="link-88" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-88', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">t</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                                <tt class="py-name">reply</tt><tt class="py-op">.</tt><tt id="link-89" class="py-name"><a title="spade.xmpp.simplexml.Node.addChild" class="py-name" href="#" onclick="return doclink('link-89', 'addChild', 'link-46');">addChild</a></tt><tt class="py-op">(</tt><tt class="py-name">node</tt><tt class="py-op">=</tt><tt class="py-name">queue_status</tt><tt class="py-op">)</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">                                <tt id="link-90" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-90', 'session', 'link-18');">session</a></tt><tt class="py-op">.</tt><tt id="link-91" class="py-name"><a title="spade.xmpp.session.Session.enqueue
spade.xmppd.xmppd.Session.enqueue" class="py-name" href="#" onclick="return doclink('link-91', 'enqueue', 'link-40');">enqueue</a></tt><tt class="py-op">(</tt><tt class="py-name">reply</tt><tt class="py-op">)</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                                <tt class="py-keyword">return</tt> </tt>
</div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line">                                 </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line">                 </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">                                 </tt>
<a name="Group.addUser"></a><div id="Group.addUser-def"><a name="L131"></a><tt class="py-lineno">131</tt> <a class="py-toggle" href="#" id="Group.addUser-toggle" onclick="return toggle('Group.addUser');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#addUser">addUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">barejid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.addUser-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.addUser-expanded"><a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">barejid</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt><tt class="py-op">.</tt><tt id="link-92" class="py-name" targets="Method spade.pyparsing.ParseResults.keys()=spade.pyparsing.ParseResults-class.html#keys,Method spade.xmpp.roster.Roster.keys()=spade.xmpp.roster.Roster-class.html#keys"><a title="spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-92', 'keys', 'link-92');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt><tt class="py-op">[</tt><tt class="py-name">barejid</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-93" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-93', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"User %s joined group %s"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">barejid</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-94" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-94', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"ok"</tt><tt class="py-op">)</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-95" class="py-name"><a title="spade.xmpp.protocol.Conflict
spade.xmppd.modules.wq.Conflict" class="py-name" href="#" onclick="return doclink('link-95', 'Conflict', 'link-41');">Conflict</a></tt> </tt>
</div><a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line"> </tt>
<a name="Group.delUser"></a><div id="Group.delUser-def"><a name="L139"></a><tt class="py-lineno">139</tt> <a class="py-toggle" href="#" id="Group.delUser-toggle" onclick="return toggle('Group.delUser');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#delUser">delUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">barejid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.delUser-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.delUser-expanded"><a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">barejid</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-96', 'keys', 'link-92');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line">                        <tt class="py-keyword">del</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">users</tt><tt class="py-op">[</tt><tt class="py-name">barejid</tt><tt class="py-op">]</tt> </tt>
<a name="L142"></a><tt class="py-lineno">142</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-97" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-97', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"User %s departed group %s"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">barejid</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-98" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-98', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"ok"</tt><tt class="py-op">)</tt> </tt>
<a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
<a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L145"></a><tt class="py-lineno">145</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-99" class="py-name"><a title="spade.xmppd.modules.wq.ItemNotFound" class="py-name" href="#" onclick="return doclink('link-99', 'ItemNotFound', 'link-68');">ItemNotFound</a></tt> </tt>
</div><a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line"> </tt>
<a name="Group.updateAgent"></a><div id="Group.updateAgent-def"><a name="L147"></a><tt class="py-lineno">147</tt> <a class="py-toggle" href="#" id="Group.updateAgent-toggle" onclick="return toggle('Group.updateAgent');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#updateAgent">updateAgent</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">barejid</tt><tt class="py-op">,</tt> <tt class="py-param">pres</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.updateAgent-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.updateAgent-expanded"><a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-100" class="py-name"><a title="spade.Platform.SpadePlatform.agents" class="py-name" href="#" onclick="return doclink('link-100', 'agents', 'link-6');">agents</a></tt><tt class="py-op">[</tt><tt class="py-name">barejid</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">pres</tt> </tt>
<a name="L149"></a><tt class="py-lineno">149</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-101" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-101', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Agent %s joined group %s"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">barejid</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-102" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-102', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"ok"</tt><tt class="py-op">)</tt> </tt>
<a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line"> </tt>
<a name="Group.getName"></a><div id="Group.getName-def"><a name="L152"></a><tt class="py-lineno">152</tt> <a class="py-toggle" href="#" id="Group.getName-toggle" onclick="return toggle('Group.getName');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#getName">getName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.getName-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.getName-expanded"><a name="L153"></a><tt class="py-lineno">153</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-103" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-103', 'name', 'link-3');">name</a></tt> </tt>
</div><a name="Group.setName"></a><div id="Group.setName-def"><a name="L154"></a><tt class="py-lineno">154</tt> <a class="py-toggle" href="#" id="Group.setName-toggle" onclick="return toggle('Group.setName');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.Group-class.html#setName">setName</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Group.setName-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Group.setName-expanded"><a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-104" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-104', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-105" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-105', 'name', 'link-3');">name</a></tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> </tt>
</div></div><a name="L157"></a><tt class="py-lineno">157</tt>  <tt class="py-line"> </tt>
<a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line"> </tt>
<a name="WQ"></a><div id="WQ-def"><a name="L159"></a><tt class="py-lineno">159</tt> <a class="py-toggle" href="#" id="WQ-toggle" onclick="return toggle('WQ');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.WQ-class.html">WQ</a><tt class="py-op">(</tt><tt class="py-base-class">PlugIn</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WQ-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="WQ-expanded"><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-docstring">        The Workgroup Queues component</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt>  <tt class="py-line">        <tt id="link-106" class="py-name" targets="Variable spade.xmppd.modules.config.Config.NS=spade.xmppd.modules.config.Config-class.html#NS,Variable spade.xmppd.modules.db_fake.AUTH.NS=spade.xmppd.modules.db_fake.AUTH-class.html#NS,Variable spade.xmppd.modules.db_fake.DB.NS=spade.xmppd.modules.db_fake.DB-class.html#NS,Variable spade.xmppd.modules.dialback.Dialback.NS=spade.xmppd.modules.dialback.Dialback-class.html#NS,Variable spade.xmppd.modules.jep0077.IBR.NS=spade.xmppd.modules.jep0077.IBR-class.html#NS,Variable spade.xmppd.modules.jep0078.NSA.NS=spade.xmppd.modules.jep0078.NSA-class.html#NS,Variable spade.xmppd.modules.message.MessageCatcher.NS=spade.xmppd.modules.message.MessageCatcher-class.html#NS,Variable spade.xmppd.modules.muc.MUC.NS=spade.xmppd.modules.muc.MUC-class.html#NS,Variable spade.xmppd.modules.oob.OOB.NS=spade.xmppd.modules.oob.OOB-class.html#NS,Variable spade.xmppd.modules.roster.ROSTER.NS=spade.xmppd.modules.roster.ROSTER-class.html#NS,Variable spade.xmppd.modules.router.Router.NS=spade.xmppd.modules.router.Router-class.html#NS,Variable spade.xmppd.modules.stream.Bind.NS=spade.xmppd.modules.stream.Bind-class.html#NS,Variable spade.xmppd.modules.stream.Handshake.NS=spade.xmppd.modules.stream.Handshake-class.html#NS,Variable spade.xmppd.modules.stream.SASL.NS=spade.xmppd.modules.stream.SASL-class.html#NS,Variable spade.xmppd.modules.stream.Session.NS=spade.xmppd.modules.stream.Session-class.html#NS,Variable spade.xmppd.modules.stream.TLS.NS=spade.xmppd.modules.stream.TLS-class.html#NS,Variable spade.xmppd.modules.webadmin.WebAdmin.NS=spade.xmppd.modules.webadmin.WebAdmin-class.html#NS,Variable spade.xmppd.modules.wq.WQ.NS=spade.xmppd.modules.wq.WQ-class.html#NS"><a title="spade.xmppd.modules.config.Config.NS
spade.xmppd.modules.db_fake.AUTH.NS
spade.xmppd.modules.db_fake.DB.NS
spade.xmppd.modules.dialback.Dialback.NS
spade.xmppd.modules.jep0077.IBR.NS
spade.xmppd.modules.jep0078.NSA.NS
spade.xmppd.modules.message.MessageCatcher.NS
spade.xmppd.modules.muc.MUC.NS
spade.xmppd.modules.oob.OOB.NS
spade.xmppd.modules.roster.ROSTER.NS
spade.xmppd.modules.router.Router.NS
spade.xmppd.modules.stream.Bind.NS
spade.xmppd.modules.stream.Handshake.NS
spade.xmppd.modules.stream.SASL.NS
spade.xmppd.modules.stream.Session.NS
spade.xmppd.modules.stream.TLS.NS
spade.xmppd.modules.webadmin.WebAdmin.NS
spade.xmppd.modules.wq.WQ.NS" class="py-name" href="#" onclick="return doclink('link-106', 'NS', 'link-106');">NS</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="WQ.plugin"></a><div id="WQ.plugin-def"><a name="L164"></a><tt class="py-lineno">164</tt> <a class="py-toggle" href="#" id="WQ.plugin-toggle" onclick="return toggle('WQ.plugin');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.WQ-class.html#plugin">plugin</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">server</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WQ.plugin-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="WQ.plugin-expanded"><a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">server</tt> <tt class="py-op">=</tt> <tt class="py-name">server</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jid</tt> <tt class="py-op">=</tt> <tt class="py-name">server</tt><tt class="py-op">.</tt><tt id="link-107" class="py-name" targets="Variable spade.xmppd.modules.config.plugins=spade.xmppd.modules.config-module.html#plugins"><a title="spade.xmppd.modules.config.plugins" class="py-name" href="#" onclick="return doclink('link-107', 'plugins', 'link-107');">plugins</a></tt><tt class="py-op">[</tt><tt class="py-string">'WQ'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'jid'</tt><tt class="py-op">]</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-108" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-108', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">server</tt><tt class="py-op">.</tt><tt id="link-109" class="py-name"><a title="spade.xmppd.modules.config.plugins" class="py-name" href="#" onclick="return doclink('link-109', 'plugins', 'link-107');">plugins</a></tt><tt class="py-op">[</tt><tt class="py-string">'WQ'</tt><tt class="py-op">]</tt><tt class="py-op">[</tt><tt class="py-string">'name'</tt><tt class="py-op">]</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-110" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-110', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Could not find MUC jid or name"</tt><tt class="py-op">,</tt><tt class="py-string">"error"</tt><tt class="py-op">)</tt> </tt>
<a name="L171"></a><tt class="py-lineno">171</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> </tt>
<a name="L172"></a><tt class="py-lineno">172</tt>  <tt class="py-line"> </tt>
<a name="L173"></a><tt class="py-lineno">173</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt> <tt class="py-op">=</tt> <tt class="py-name">dict</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L174"></a><tt class="py-lineno">174</tt>  <tt class="py-line"> </tt>
<a name="L175"></a><tt class="py-lineno">175</tt>  <tt class="py-line">                <tt class="py-comment"># Test stuff</tt> </tt>
<a name="L176"></a><tt class="py-lineno">176</tt>  <tt class="py-line">                <tt class="py-name">g</tt> <tt class="py-op">=</tt> <tt id="link-111" class="py-name" targets="Class spade.pyparsing.Group=spade.pyparsing.Group-class.html,Class spade.xmppd.modules.wq.Group=spade.xmppd.modules.wq.Group-class.html"><a title="spade.pyparsing.Group
spade.xmppd.modules.wq.Group" class="py-name" href="#" onclick="return doclink('link-111', 'Group', 'link-111');">Group</a></tt><tt class="py-op">(</tt><tt class="py-string">"test"</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L177"></a><tt class="py-lineno">177</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-112" class="py-name" targets="Method spade.xmppd.modules.wq.WQ.addGroup()=spade.xmppd.modules.wq.WQ-class.html#addGroup"><a title="spade.xmppd.modules.wq.WQ.addGroup" class="py-name" href="#" onclick="return doclink('link-112', 'addGroup', 'link-112');">addGroup</a></tt><tt class="py-op">(</tt><tt class="py-name">g</tt><tt class="py-op">)</tt> </tt>
<a name="L178"></a><tt class="py-lineno">178</tt>  <tt class="py-line"> </tt>
<a name="L179"></a><tt class="py-lineno">179</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-113" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-113', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Created WQ: '%s' '%s'"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-114" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-114', 'name', 'link-3');">name</a></tt><tt class="py-op">,</tt><tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jid</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-string">"warn"</tt><tt class="py-op">)</tt> </tt>
</div><a name="L180"></a><tt class="py-lineno">180</tt>  <tt class="py-line"> </tt>
<a name="WQ.addGroup"></a><div id="WQ.addGroup-def"><a name="L181"></a><tt class="py-lineno">181</tt> <a class="py-toggle" href="#" id="WQ.addGroup-toggle" onclick="return toggle('WQ.addGroup');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.WQ-class.html#addGroup">addGroup</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">group</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt> <tt class="py-op">=</tt> <tt class="py-string">""</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WQ.addGroup-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="WQ.addGroup-expanded"><a name="L182"></a><tt class="py-lineno">182</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">group</tt> <tt class="py-keyword">and</tt> <tt class="py-keyword">not</tt> <tt id="link-115" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-115', 'name', 'link-3');">name</a></tt><tt class="py-op">:</tt> </tt>
<a name="L183"></a><tt class="py-lineno">183</tt>  <tt class="py-line">                        <tt class="py-comment"># WTF</tt> </tt>
<a name="L184"></a><tt class="py-lineno">184</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-116" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-116', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"addGroup called without parameters"</tt><tt class="py-op">,</tt><tt class="py-string">"warn"</tt><tt class="py-op">)</tt> </tt>
<a name="L185"></a><tt class="py-lineno">185</tt>  <tt class="py-line">                        <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L186"></a><tt class="py-lineno">186</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-keyword">not</tt> <tt class="py-name">group</tt> <tt class="py-keyword">and</tt> <tt id="link-117" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-117', 'name', 'link-3');">name</a></tt><tt class="py-op">:</tt> </tt>
<a name="L187"></a><tt class="py-lineno">187</tt>  <tt class="py-line">                        <tt class="py-name">group</tt> <tt class="py-op">=</tt> <tt id="link-118" class="py-name"><a title="spade.pyparsing.Group
spade.xmppd.modules.wq.Group" class="py-name" href="#" onclick="return doclink('link-118', 'Group', 'link-111');">Group</a></tt><tt class="py-op">(</tt><tt id="link-119" class="py-name"><a title="spade.Agent.name
spade.MTP.name
spade.Organization.name
spade.Organization_new.name
spade.Unit.name
spade.Unit_new.name
spade.socialnetwork.name
spade.xmpp.auth.name
spade.xmpp.browser.name
spade.xmpp.commands.Command_Handler_Prototype.name
spade.xmpp.commands.TestCommand.name
spade.xmpp.commands.name
spade.xmpp.dispatcher.name
spade.xmpp.features.name
spade.xmpp.filetransfer.name
spade.xmpp.name
spade.xmpp.protocol.name
spade.xmpp.roster.name
spade.xmpp.transports.name
spade.xmppd.xmppd.name" class="py-name" href="#" onclick="return doclink('link-119', 'name', 'link-3');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
<a name="L188"></a><tt class="py-lineno">188</tt>  <tt class="py-line">                <tt class="py-keyword">elif</tt> <tt class="py-name">group</tt><tt class="py-op">:</tt> </tt>
<a name="L189"></a><tt class="py-lineno">189</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">group</tt><tt class="py-op">.</tt><tt id="link-120" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-120', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-121', 'keys', 'link-92');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L190"></a><tt class="py-lineno">190</tt>  <tt class="py-line">                                <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L191"></a><tt class="py-lineno">191</tt>  <tt class="py-line">                        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L192"></a><tt class="py-lineno">192</tt>  <tt class="py-line">                                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-name">group</tt><tt class="py-op">.</tt><tt id="link-122" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-122', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt class="py-name">group</tt> </tt>
<a name="L193"></a><tt class="py-lineno">193</tt>  <tt class="py-line">                                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-123" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-123', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"Added group %s to Workgroup Queues"</tt><tt class="py-op">%</tt><tt class="py-op">(</tt><tt class="py-name">group</tt><tt class="py-op">.</tt><tt id="link-124" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-124', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">,</tt><tt class="py-string">"ok"</tt><tt class="py-op">)</tt> </tt>
<a name="L194"></a><tt class="py-lineno">194</tt>  <tt class="py-line">                                <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L195"></a><tt class="py-lineno">195</tt>  <tt class="py-line"> </tt>
<a name="WQ.addUser"></a><div id="WQ.addUser-def"><a name="L196"></a><tt class="py-lineno">196</tt> <a class="py-toggle" href="#" id="WQ.addUser-toggle" onclick="return toggle('WQ.addUser');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.WQ-class.html#addUser">addUser</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">barejid</tt><tt class="py-op">,</tt> <tt class="py-param">gname</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WQ.addUser-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="WQ.addUser-expanded"><a name="L197"></a><tt class="py-lineno">197</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">gname</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">.</tt><tt id="link-125" class="py-name"><a title="spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-125', 'keys', 'link-92');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L198"></a><tt class="py-lineno">198</tt>  <tt class="py-line">                        <tt class="py-comment"># Group does not exist</tt> </tt>
<a name="L199"></a><tt class="py-lineno">199</tt>  <tt class="py-line">                        <tt class="py-keyword">raise</tt> <tt id="link-126" class="py-name"><a title="spade.xmppd.modules.wq.ItemNotFound" class="py-name" href="#" onclick="return doclink('link-126', 'ItemNotFound', 'link-68');">ItemNotFound</a></tt> </tt>
<a name="L200"></a><tt class="py-lineno">200</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L201"></a><tt class="py-lineno">201</tt>  <tt class="py-line">                        <tt class="py-comment"># User tries to join group</tt> </tt>
<a name="L202"></a><tt class="py-lineno">202</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-name">gname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-127" class="py-name"><a title="spade.xmppd.modules.wq.Group.addUser
spade.xmppd.modules.wq.WQ.addUser" class="py-name" href="#" onclick="return doclink('link-127', 'addUser', 'link-35');">addUser</a></tt><tt class="py-op">(</tt><tt class="py-name">barejid</tt><tt class="py-op">)</tt> </tt>
</div><a name="L203"></a><tt class="py-lineno">203</tt>  <tt class="py-line">         </tt>
<a name="WQ.dispatch"></a><div id="WQ.dispatch-def"><a name="L204"></a><tt class="py-lineno">204</tt> <a class="py-toggle" href="#" id="WQ.dispatch-toggle" onclick="return toggle('WQ.dispatch');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="spade.xmppd.modules.wq.WQ-class.html#dispatch">dispatch</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">session</tt><tt class="py-op">,</tt> <tt class="py-param">stanza</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="WQ.dispatch-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="WQ.dispatch-expanded"><a name="L205"></a><tt class="py-lineno">205</tt>  <tt class="py-line">                <tt class="py-docstring">"""</tt> </tt>
<a name="L206"></a><tt class="py-lineno">206</tt>  <tt class="py-line"><tt class="py-docstring">                Mini-dispatcher for the jabber stanzas that arrive to the WQ</tt> </tt>
<a name="L207"></a><tt class="py-lineno">207</tt>  <tt class="py-line"><tt class="py-docstring">                """</tt> </tt>
<a name="L208"></a><tt class="py-lineno">208</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-128" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-128', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"WQ dispatcher called"</tt><tt class="py-op">,</tt> <tt class="py-string">"warn"</tt><tt class="py-op">)</tt> </tt>
<a name="L209"></a><tt class="py-lineno">209</tt>  <tt class="py-line">                <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L210"></a><tt class="py-lineno">210</tt>  <tt class="py-line">                        <tt class="py-name">to</tt> <tt class="py-op">=</tt> <tt class="py-name">stanza</tt><tt class="py-op">[</tt><tt class="py-string">'to'</tt><tt class="py-op">]</tt> </tt>
<a name="L211"></a><tt class="py-lineno">211</tt>  <tt class="py-line">                        <tt class="py-name">gname</tt> <tt class="py-op">=</tt> <tt class="py-name">to</tt><tt class="py-op">.</tt><tt id="link-129" class="py-name" targets="Method spade.xmpp.protocol.JID.getNode()=spade.xmpp.protocol.JID-class.html#getNode"><a title="spade.xmpp.protocol.JID.getNode" class="py-name" href="#" onclick="return doclink('link-129', 'getNode', 'link-129');">getNode</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L212"></a><tt class="py-lineno">212</tt>  <tt class="py-line">                        <tt class="py-name">domain</tt> <tt class="py-op">=</tt> <tt class="py-name">to</tt><tt class="py-op">.</tt><tt id="link-130" class="py-name" targets="Method spade.Agent.AbstractAgent.getDomain()=spade.Agent.AbstractAgent-class.html#getDomain,Method spade.xmpp.protocol.JID.getDomain()=spade.xmpp.protocol.JID-class.html#getDomain"><a title="spade.Agent.AbstractAgent.getDomain
spade.xmpp.protocol.JID.getDomain" class="py-name" href="#" onclick="return doclink('link-130', 'getDomain', 'link-130');">getDomain</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L213"></a><tt class="py-lineno">213</tt>  <tt class="py-line">                <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L214"></a><tt class="py-lineno">214</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-131" class="py-name"><a title="spade.Agent.AbstractAgent.DEBUG
spade.spade_backend.SpadeBackend.DEBUG
spade.xmpp.client.PlugIn.DEBUG
spade.xmpp.simplexml.NodeBuilder.DEBUG
spade.xmpp.transports.HTTPPROXYsocket.DEBUG" class="py-name" href="#" onclick="return doclink('link-131', 'DEBUG', 'link-7');">DEBUG</a></tt><tt class="py-op">(</tt><tt class="py-string">"There was no 'to'"</tt><tt class="py-op">,</tt><tt class="py-string">'warn'</tt><tt class="py-op">)</tt> </tt>
<a name="L215"></a><tt class="py-lineno">215</tt>  <tt class="py-line"> </tt>
<a name="L216"></a><tt class="py-lineno">216</tt>  <tt class="py-line">                <tt class="py-comment"># No group name. Stanza directed to the WQ</tt> </tt>
<a name="L217"></a><tt class="py-lineno">217</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">gname</tt> <tt class="py-op">==</tt> <tt class="py-string">''</tt> <tt class="py-keyword">and</tt> <tt class="py-name">domain</tt> <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L218"></a><tt class="py-lineno">218</tt>  <tt class="py-line">                        <tt class="py-keyword">if</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-132" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-132', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'iq'</tt><tt class="py-op">:</tt> </tt>
<a name="L219"></a><tt class="py-lineno">219</tt>  <tt class="py-line">                                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-133" class="py-name"><a title="spade.xmppd.modules.muc.MUC.IQ_cb
spade.xmppd.modules.muc.Room.IQ_cb
spade.xmppd.modules.wq.Group.IQ_cb" class="py-name" href="#" onclick="return doclink('link-133', 'IQ_cb', 'link-17');">IQ_cb</a></tt><tt class="py-op">(</tt><tt id="link-134" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-134', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
<a name="L220"></a><tt class="py-lineno">220</tt>  <tt class="py-line">                        <tt class="py-keyword">elif</tt> <tt class="py-name">stanza</tt><tt class="py-op">.</tt><tt id="link-135" class="py-name"><a title="spade.AID.aid.getName
spade.Agent.AbstractAgent.getName
spade.DF.DfAgentDescription.getName
spade.DF.ServiceDescription.getName
spade.pyparsing.ParseResults.getName
spade.xmpp.roster.Roster.getName
spade.xmpp.simplexml.Node.getName
spade.xmppd.modules.muc.Room.getName
spade.xmppd.modules.wq.Group.getName
spade.xmppd.xmppd.Session.getName" class="py-name" href="#" onclick="return doclink('link-135', 'getName', 'link-15');">getName</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">==</tt> <tt class="py-string">'presence'</tt><tt class="py-op">:</tt> </tt>
<a name="L221"></a><tt class="py-lineno">221</tt>  <tt class="py-line">                                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-136" class="py-name"><a title="spade.xmppd.modules.muc.MUC.Presence_cb
spade.xmppd.modules.muc.Room.Presence_cb" class="py-name" href="#" onclick="return doclink('link-136', 'Presence_cb', 'link-20');">Presence_cb</a></tt><tt class="py-op">(</tt><tt id="link-137" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-137', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
<a name="L222"></a><tt class="py-lineno">222</tt>  <tt class="py-line">                        <tt class="py-comment"># TODO: Implement the rest of protocols</tt> </tt>
<a name="L223"></a><tt class="py-lineno">223</tt>  <tt class="py-line">                <tt class="py-comment"># Stanza directed to a specific group</tt> </tt>
<a name="L224"></a><tt class="py-lineno">224</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">gname</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">.</tt><tt id="link-138" class="py-name"><a title="spade.pyparsing.ParseResults.keys
spade.xmpp.roster.Roster.keys" class="py-name" href="#" onclick="return doclink('link-138', 'keys', 'link-92');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-keyword">and</tt> <tt class="py-name">domain</tt> <tt class="py-op">==</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">jid</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L225"></a><tt class="py-lineno">225</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">groups</tt><tt class="py-op">[</tt><tt class="py-name">gname</tt><tt class="py-op">]</tt><tt class="py-op">.</tt><tt id="link-139" class="py-name" targets="Method spade.MTP.MTP.dispatch()=spade.MTP.MTP-class.html#dispatch,Method spade.xmpp.dispatcher.Dispatcher.dispatch()=spade.xmpp.dispatcher.Dispatcher-class.html#dispatch,Method spade.xmpp.simplexml.NodeBuilder.dispatch()=spade.xmpp.simplexml.NodeBuilder-class.html#dispatch,Method spade.xmppd.modules.muc.MUC.dispatch()=spade.xmppd.modules.muc.MUC-class.html#dispatch,Method spade.xmppd.modules.muc.Room.dispatch()=spade.xmppd.modules.muc.Room-class.html#dispatch,Method spade.xmppd.modules.wq.Group.dispatch()=spade.xmppd.modules.wq.Group-class.html#dispatch,Method spade.xmppd.modules.wq.WQ.dispatch()=spade.xmppd.modules.wq.WQ-class.html#dispatch,Method spade.xmppd.xmppd.Session.dispatch()=spade.xmppd.xmppd.Session-class.html#dispatch"><a title="spade.MTP.MTP.dispatch
spade.xmpp.dispatcher.Dispatcher.dispatch
spade.xmpp.simplexml.NodeBuilder.dispatch
spade.xmppd.modules.muc.MUC.dispatch
spade.xmppd.modules.muc.Room.dispatch
spade.xmppd.modules.wq.Group.dispatch
spade.xmppd.modules.wq.WQ.dispatch
spade.xmppd.xmppd.Session.dispatch" class="py-name" href="#" onclick="return doclink('link-139', 'dispatch', 'link-139');">dispatch</a></tt><tt class="py-op">(</tt><tt id="link-140" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-140', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt> <tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
<a name="L226"></a><tt class="py-lineno">226</tt>  <tt class="py-line">                <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L227"></a><tt class="py-lineno">227</tt>  <tt class="py-line">                        <tt class="py-comment"># The room does not exist</tt> </tt>
<a name="L228"></a><tt class="py-lineno">228</tt>  <tt class="py-line">                        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-141" class="py-name" targets="Method spade.xmppd.modules.muc.MUC.notExist_cb()=spade.xmppd.modules.muc.MUC-class.html#notExist_cb"><a title="spade.xmppd.modules.muc.MUC.notExist_cb" class="py-name" href="#" onclick="return doclink('link-141', 'notExist_cb', 'link-141');">notExist_cb</a></tt><tt class="py-op">(</tt><tt id="link-142" class="py-name"><a title="spade.xmpp.session" class="py-name" href="#" onclick="return doclink('link-142', 'session', 'link-18');">session</a></tt><tt class="py-op">,</tt><tt class="py-name">stanza</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L229"></a><tt class="py-lineno">229</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="spade-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Wed May 26 16:26:26 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
